package 设计模式.SimpleFactory;

public class test {
    public static void main(String[]args){
        Train t1=(Train) TrafficFactory.make("火车");
        Car c1=(Car) TrafficFactory.make("汽车");
        t1.setGl(3000);t1.setZz(100);
        c1.setGl(1000);c1.setZz(5);
        t1.transform();
        c1.transform();
    }
}
